<template>
  <el-input v-bind="$attrs" :style="`text-align: ${align}`" :disabled="disabled" :type="type">
    <slot></slot>
  </el-input>
  <!-- <div style="width:100%">
    <component
      :is="type === 'number' ? 'el-input-number' : 'el-input'"
       v-model="childInputValue"
       :style="{ width: width || '100%' }"
       v-bind="{
            ...$attrs,
          }"
    >
      <template v-for="(index, name) in slots" v-slot:[name]="data">
        <slot :name="name" v-bind="data" />
      </template>
    </component>
    
  </div> -->
</template>

<script setup lang="ts">
defineProps({
  // 宽度
  align: {
    type: String,
    default: 'left',
  },
  disabled:{
    type: Boolean,
    default: false,
  },
  type:{
    type: String,
    default: 'text',
  }
  // dynamicObj: {
  //   type: Object,
  //   default: {
  //     id: 2,
  //     name: '3',
  //     lable: '55'
  //   }
  // }
})
</script>
